FROM  registry.cn-hangzhou.aliyuncs.com/choerodon-tools/golang-ci:0.8.0 AS build

COPY . /go/src/github.com/go-terminated

WORKDIR /go/src/github.com/go-terminated

RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build .

FROM scratch
COPY --from=build go/src/github.com/go-terminated/go-terminated .
COPY ./test.log .
CMD ["./go-terminated"]